package test3.A1_3;

import java.util.HashSet;
import java.util.Set;

//代表学院的类
class School {
    private String name; // 学院名称
    private Set<Department> departments; // 学院包含的系

    //构造函数
    public School(String name) {
        this.name = name;
        this.departments = new HashSet<>();
    }

    //添加一个系到学院
    public void addDepartment(Department department) {
        departments.add(department);
    }

    //获取学院中的所有系
    public Set<Department> getDepartments() {
        return departments;
    }
}